HARBOR_SERVER_URL=192.168.3.180/myimg/

CALICO_CNI_IMAGE=calico-cni.tar
CALICO_KUBE_CONTROLLERS=calico-kube-controllers.tar
CALICO_NODE=calico-node.tar
CALICO_POD2DAEMON=calico-pod2daemon.tar
CALICO_APISERVER=calico_apiserver_v3.27.5-amd64.tar.gz
CALICO_CSI=calico_csi_v3.27.5-amd64.tar.gz
CALICO_DIKASTES=calico-dikastes.tar
CALICO_FLANNEL_MIGRATION=calico-flannel-migration-controller.tar
CALICO_NODE_DRIVER=calico_node-driver-registrar_v3.27.5-amd64.tar.gz
CALICO_TYPHA=calico-typha.tar

COREDNS_IMAGE=coredns_coredns_latest-amd64.tar.gz

docker load -i $CALICO_CNI_IMAGE
docker load -i $CALICO_KUBE_CONTROLLERS
docker load -i $CALICO_NODE
docker load -i $CALICO_POD2DAEMON
docker load -i $CALICO_APISERVER
docker load -i $CALICO_CSI
docker load -i $CALICO_DIKASTES
docker load -i $CALICO_FLANNEL_MIGRATION
docker load -i $CALICO_NODE_DRIVER
docker load -i $CALICO_TYPHA

docker load -i $COREDNS_IMAGE

docker images | grep ^calico | awk '{print "docker tag "$1":"$2" ""'$HARBOR_SERVER_URL'"$1":"$2}' | bash
docker images | grep ^coredns | awk '{print "docker tag "$1":"$2" ""'$HARBOR_SERVER_URL'"$1":"$2}' | bash

docker images | grep ^$HARBOR_SERVER_URL | awk '{print "docker push "$1":"$2}' | bash

